package com.example.vo.buyer;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @author 朽
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CartItemVo implements Serializable {
    private static final long serialVersionUID = 4195602508777392335L;
    /**
     * 购物车id
     */
    private Long id;

    /**
     * 选中状态
     */
    private Integer check;

    /**
     * 商品详细id
     */
    private Long skuId;

    /**
     * 商品详细名称
     */
    private String skuName;

    /**
     * 商品图片
     */
    private String skuImage;

    /**
     * 商品价格
     */
    private BigDecimal skuPrice;

    /**
    * 商品id
    */
    private Long spuId;

    /**
     * 商品名称
     */
    private String spuName;

    /**
     * 加入购物车数量
     */
    private Integer count;

    /**
     * 商品库存
     */
    private Long stock;

    /**
     * 库存剩余数量
     */
    private Long quantity;

    /**
     * 选择的销售属性
     */
    private String saleAttrs;

    /**
     * 属性名和属性值列表的映射关系
     * Key: 属性名
     * Value: 对应的属性值列表
     */
    private Map<String, List<String>> attrValuesMap;

    /**
     * 优惠券减免金额
     */
    private BigDecimal couponAmount;

    /**
     * 减免后真实金额
     */
    private BigDecimal realAmount;

    /**
     * 商品分类ID
     */
    private Long categoryId;

    /**
     * 商品使用优惠券id集合
     */
    private String couponIds;

    public CartItemVo(Long id, Integer check, Long skuId, String skuName, String skuImage,
                      BigDecimal skuPrice, Long spuId, String spuName, Integer count,
                      Long stock, Long quantity,String saleAttrs,Long categoryId) {
        this.id = id;
        this.check = check;
        this.skuId = skuId;
        this.skuName = skuName;
        this.skuImage = skuImage;
        this.skuPrice = skuPrice;
        this.spuId = spuId;
        this.spuName = spuName;
        this.count = count;
        this.stock = stock;
        this.quantity =quantity;
        this.saleAttrs = saleAttrs;
        this.categoryId = categoryId;
    }
}
